import request from '@/utils/request'

/* 根据id查询工序*/
export function selectProcessById(data) {
  return request({
    url: '/erp/process/selectProcessById/' + data,
    method: 'post'
  })
}

/* 列表分页*/
export function selectProcessPage(data) {
  return request({
    url: '/erp/process/selectProcessPage',
    method: 'post',
    data: data
  })
}

/* 查询全部*/
export function selectAllProcess() {
  return request({
    url: '/erp/process/selectAllProcess',
    method: 'post'
  })
}

/* 列表查询*/
export function selectProcessByName(data) {
  return request({
    url: '/erp/process/selectProcessByName',
    method: 'post',
    data: data
  })
}

/* 新增*/
export function saveProcess(data) {
  return request({
    url: '/erp/process/saveProcess',
    method: 'post',
    data: data
  })
}

/* 修改*/
export function updateProcessById(data) {
  return request({
    url: '/erp/process/updateProcessById',
    method: 'post',
    data: data
  })
}

/* 删除*/
export function deleteProcess(data) {
  return request({
    url: '/erp/process/deleteProcess',
    method: 'post',
    data: data
  })
}

/* 查询工序关联员工*/
export function selectEmployeeByProcessId(data) {
  return request({
    url: '/erp/process/selectEmployeeByProcessId/' + data,
    method: 'post'
  })
}

/* 修改工序关联员工*/
export function updateProcessEmployee(data) {
  return request({
    url: '/erp/process/updateProcessEmployee',
    method: 'post',
    data: data
  })
}
